package com.itheima.sys.controller;

import com.itheima.common.vo.Result;
import com.itheima.sys.dto.SysFunctionDTO;
import com.itheima.sys.service.ISysFunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SysFunctionController {

    @Autowired
    private ISysFunctionService functionService;

    /**
     * 查询当前企业下包含权限数据
     * @return
     */
    @GetMapping("/company/config/permissions")
    public Result<List<SysFunctionDTO>> queryFunctionsByCompanyId(){
        return Result.success(functionService.queryFunctionsByCompanyId());
    }
}
